<h2 class="contentTitle" style="margin-bottom:0px;">添加文章</h2>
<div class="page">
  <div class="pageContent" layouth="31">
    <form method="post" class="pageForm required-validate" action="<?php echo Yii::app()->request->requestUri?>" enctype="multipart/form-data" onsubmit="return iframeCallback(this);">
      <div class="mypageFormContent" style="clear:both;margin-left:24px;padding:8px 0px;">
        <input type="hidden" name="action" value="edit" />
        <table>
          <?php foreach(Yii::app()->params['langs'] as $lang => $name):?>
          <tr>
            <th style="width:80px;"><?php echo $name ?>标题：</th>
            <td style="padding:8px;"><input type="text" name="title[<?php echo $lang ?>]" size="30" value="<?php echo CHtml::encode($obj[$lang]->title);?>" class="required textInput" /></td>
          </tr>
          <tr>
            <th style="width:80px;"><?php echo $name ?>内容：</th>
            <td style="padding:8px;"><textarea cols="80" name="content[<?php echo $lang ?>]" style="width:1000px;height:300px;"><?php echo CHtml::encode($obj[$lang]->content);?></textarea></td>
          </tr>
          <?php endforeach;?>
          <tr>
            <th style="width:80px;">排序（<?php if($this->order == 'DESC'):?>大数在前<?php else:?>大数在后<?php endif;?>）：</th>
            <td style="padding:8px;"><input type="text" name="order_id" size="30" class="required textInput" value="30" /></td>
          </tr>
          <tr>
          <tr>
            <th style="width:80px;">上传缩略图：</th>
            <td style="padding:8px;"><input type="file" name="thumbnail" /></td>
          </tr>
          <tr>
            <th style="width:80px;">文章分类：</th>
            <td style="padding:8px;">
            <?php foreach($categorys as $c):?>
            <input id="<?php echo 'check',$c->id;?>" value="<?php echo $c->id;?>" type="checkbox" name="category[]" <?php if(in_array($c->id, $selected_category)):?> checked="checked"<?php endif;?>/><label for="<?php echo 'check',$c->id;?>"><?php echo $c->name?></label>
            <?php endforeach;?>
            </td>
          </tr>
          <tr>
            <th style="width:80px;"></th>
            <td><div class="buttonActive"><div class="buttonContent"><button>&nbsp;&nbsp;提交&nbsp;&nbsp;</button></div></div></td>
          </tr>
        </table>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
$("textarea").xheditor({upImgUrl:"/site/uploadimg",upImgExt:"jpg,jpeg,gif,png"});
</script>